while True:
    grade = input("请输入一到一百的数字:")
    if int(grade) > 100 or int(grade) < 0:
        print("请重新输入一到一百的数字")
        continue
    elif(grade == "0"):
        print("退出")
        break
    else:
        if grade.isdigit():
            x = int(grade)
            if(85 <= x <= 100):
                print("成绩优秀")
            elif(60 <= x < 85):
                print("成绩良好")
            else:
                print("不及格")
        else:
            print("请输入数字,或者输入Q退出")
